package com.quanquan.store.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @ClassName:Order
 * @Description:TODO
 * @Author:xiongjunbao
 * @Date:2019/3/21 8:33
 * @Version 1.0
 */
@Data
@Entity
@Table(name = "oo_order")
public class Order implements Serializable {
    @Id
    @Column(name = "id", unique = true, length = 64)
    private String id;
    /**
     * 订单号
     */
    @Column(name = "order_num", unique = true, length = 64)
    private String orderNum;
    @Column(name = "create_time", length = 32)
    private String createTime;
    @Column(name = "update_time", length = 32)
    private String updateTime;
    /**
     * 券id
     */
    @Column(name = "coupon_id", length = 64)
    private String couponId;
    /**
     * 用户id
     */
    @Column(name = "user_id", length = 64)
    private String userId;
    /**
     * 用户id
     */
    @Column(name = "store_id", length = 64)
    private String storeId;
    /**
     * 购买数量
     */
    @Column(name = "count")
    private Integer count;
    /**
     * 价值积分
     */
    @Column(name = "integral")
    private Integer integral;
    /**
     * 价格
     */
    @Column(name = "price")
    private Double price;
    /**
     * 订单状态 ，暂未定义，根据开发需求决定要不要
     */
    @Column(name = "status", columnDefinition = "TINYINT default 0")
    private Integer status;
    @Column(name = "status_show", nullable = false, columnDefinition = "TINYINT default 0")
    private Integer statusShow;
    @Column(name = "status_remove", nullable = false, columnDefinition = "TINYINT default 0")
    private Integer statusRemove;

    /**
     * 微信返回订单号
     */
    private String transactionId;

}
